import { ipcRenderer } from 'electron'
import emitter from '@/render/utils/mitt'

interface IMenuTemplate {
  label: string
  click: () => void
}
export const fileMenuConfig: IMenuTemplate[] = [
  {
    label: '新建工程',
    click: (): void => {
      emitter.emit('open-newproject', 'emitter')
    }
  },
  {
    label: '退出',
    click: (): void => {
      ipcRenderer.send('close-app')
    }
  }
]
